<div id="content">
    <div class="box">
        <div class="title">
            <h5>内容管理>语言设置</h5>
        </div>
        <form action="index" name="form_view">
            <input type="hidden" name="current"/>
            <div class="table">
                <table>
                    <thead>
                    <tr>
                        <th class="tac" style="width: 25px;" ><input type="checkbox" name="checkall" onclick="triggerCK()"/></th>
                        <th class="tal">语言</th>
                        <th>图标</th>
                        <?php
                        if($this->actExist('Edit,Del')){
                            ?>
                            <th class="last" style="width: 150px;">工具</th>
                        <?php
                        }
                        ?>
                    </tr>
                    </thead>
                    <tbody>
                    <?php
                    if(sizeof($langs)>0){
                        foreach ( $langs as $l ) {
                            ?>
                            <tr>
                                <td><input type="checkbox" name="ck" value="<?php echo $l['id']; ?>" /></td>
                                <td><?php echo $l['lang'];?></td>
                                <td class="tac"><img src="<?php echo $l['icon'];?>" /></td>
                                <?php
                                if($this->actExist('Edit,Del')){
                                    ?>
                                    <td class="tac">
                                        <?php
                                        $id = $l['id'];
                                        $this->actPermission('<button class="btn" onclick="showedit('.$id.')">编辑</button>',"Edit");
                                        ?>
                                    </td>
                                <?php
                                }
                                ?>
                            </tr>
                        <?php
                        }
                    }
                    ?>
                    </tbody>
                </table>
            </div>
        </form>
    </div>
</div>
<script>
    var current = 1;
    function showedit(aid){
        window.location.href="showedit?id="+aid+"&current="+current;
    }
</script>